ActionController::Routing::Routes.draw do |map|

  map.root :controller => 'users', :action => 'about'

  map.login "login", :controller => "user_sessions", :action => "new"
  map.logout "logout", :controller => "user_sessions", :action => "destroy"

  # to ponizej jest potrzebne do ATOM feed. Do niczego wiecej sie nie uzywa.
  map.resource :print, :only => :show
    
  map.resources :user_sessions

  map.connect 'feed', :controller => 'users', :action => 'feed', :format => 'atom'    

  # ten wpis jest od pobierania plikow, taki dosc standardowy  
  map.connect 'files/download/:id', :controller => 'users', :action => 'download'

  map.auto_complete ':controller/:action',
                  :requirements => { :action => /auto_complete_for_\S+/ },
                  :conditions => { :method => :get }
  
  # Install the default routes as the lowest priority.
  # Note: These default routes make all actions in every controller accessible via GET requests. You should
  # consider removing the them or commenting them out if you're using named routes and resources.
  
  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'
  map.connect ':controller/:action.:format'
  map.connect ':controller/:action/'


  map.register '/register/:activation_code', :controller => 'activations', :action => 'new'
  map.activate '/activate/:id', :controller => 'activations', :action => 'create'
  
  
end
